import {get,post} from './http.js'

// 获取一级分类信息(首页快速分类导航)
export const getCate = () => get('/api/getcate')
// 获取商品全部分类信息(全部分类，数据呈递归树状)
export const getCates = () => get('/api/getcates');
// 获取轮播图信息(首页)
export const getBanner = () => get('/api/getbanner');
// 获取限时秒杀信息(首页)
export const getSeckill = () => get('/api/getseckill');
// 获取商品信息(首页)
export const gethortGoods = () =>get('/api/gethortgoods');
// 搜索（like模糊搜索）
export const search = (params) => get('/api/search',params);
// 获取一级分类下的所有商品
export const getGoodlist1 = (params) => get('/api/getgoodlist',params);
// 获取二级分类下的所有商品
export const getGoodlist2 = (params) => get('/api/getgoodlist',params);
// 获取一个商品信息
export const getGoodsinfo = (params) => get('/api/getgoodsinfo',params);
// 会员注册
export const register = (params) => post('/api/register',params);
// 会员登录
export const login = (params) => post('/api/login',params);
// 购物车列表
export const cartList = (params) => get('/api/cartlist',params);
// 购物车添加
export const cartAdd = (params) => post('/api/cartadd',params);
// 购物车修改
export const cartEdit = (params) => post('/api/cartedit',params);
// 购物车删除
export const cartDelete = (params) => post('/api/cartdelete',params);
// 订单生成
export const orderAdd = (params) => post('/api/orderadd',params);
// 订单查询
export const orderList = (params) => get('/api/orderlist',params);
// 地址查询
export const addressList = (params) => get('/api/addresslist',params);
// 地址添加
export const addressAdd = (params) => post('/api/addressadd',params);
// 地址编辑
export const addressEdit = (params) => post('/api/addressedit',params);
// 地址删除
export const addressRemove = (params) => post('/api/addressremove',params);
// 发送短信验证码
export const sms = (params) => get('/api/sms',params);


